package com.atguigu.springcloud.service.impl;

import com.atguigu.springcloud.dao.PaymentDao;
import com.atguigu.springcloud.entity.Payment;
import com.atguigu.springcloud.service.PaymentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author lizhilong
 * @create 2020/4/19 21:57
 * @desc
 */
@Service
public class PaymentServiceImpl implements PaymentService {
    @Resource
    private PaymentDao paymentDao;

    @Override
    public Long create(Payment payment) {
        paymentDao.create(payment);
        return payment.getId();
    }

    @Override
    public Payment selectById(Long id) {
        return paymentDao.selectById(id);
    }
}
